package cn.rkylin.oms.sysrefund.dao.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import cn.rkylin.core.IDataBaseFactory;
import cn.rkylin.oms.sysrefund.dao.ISysRefundSkuDAO;
import cn.rkylin.oms.sysrefund.domain.SysRefundSku;

/**
 * 类名:SysRefundSkuDAOImpl <br/>
  * 作用: 系统退款单详情数据访问层实现. <br/>
 * 创建原因:     系统退款单详情数据访问层实现. <br/>
 * 创建时间:     2017年9月30日 上午10:25:51 <br/>
 * @author   zhanghao
 * @version  v1.0 
 */
@Repository("sysRefundSkuDAO")
public class SysRefundSkuDAOImpl implements ISysRefundSkuDAO {
    
    @Autowired
    IDataBaseFactory dao;
    
    private String STATEMENT_INSERT_BATCH_SYSREFUNDSKUS = "insertBatchRefundSku";
    private String STATEMENT_INSERT_SELECTIVE_SYSREFUNDSKU = "insertSelectiveRefundSku";
    private String STATEMENT_SELECT_BY_REFUND_ID = "selectByRefundId";

    /**
     * TODO [简要描述复写方法的内容].
     * @see cn.rkylin.oms.sysrefund.dao.ISysRefundSkuDAO#deleteByPrimaryKey(java.lang.String)
     */
    @Override
    public int deleteByPrimaryKey(String refundSkuId) {

        // TODO Auto-generated method stub
        return 0;
    }

    /**
     * 插入退款单明细.
     * @throws Exception 
     * @see cn.rkylin.oms.sysrefund.dao.ISysRefundSkuDAO#insert(cn.rkylin.oms.sysrefund.domain.SysRefundSku)
     */
    @Override
    public int insert(SysRefundSku record) throws Exception {
        return dao.insert(STATEMENT_INSERT_SELECTIVE_SYSREFUNDSKU, record);
    }

    /**
     * 插入退款单明细.
     * @see cn.rkylin.oms.sysrefund.dao.ISysRefundSkuDAO#insertSelective(cn.rkylin.oms.sysrefund.domain.SysRefundSku)
     */
    @Override
    public int insertSelective(SysRefundSku record) throws Exception {
        return dao.insert(STATEMENT_INSERT_SELECTIVE_SYSREFUNDSKU, record);
    }

    /**
     * TODO [简要描述复写方法的内容].
     * @see cn.rkylin.oms.sysrefund.dao.ISysRefundSkuDAO#selectByPrimaryKey(java.lang.String)
     */
    @Override
    public SysRefundSku selectByPrimaryKey(String refundSkuId) {

        // TODO Auto-generated method stub
        return null;
    }
    
    /**
     * 根据退款单ID查询退款商品.
     * @see cn.rkylin.oms.sysrefund.dao.ISysRefundSkuDAO#selectByRefundId(java.lang.String)
     */
    @Override
    public List<SysRefundSku> selectByRefundId(String refundId) throws Exception  {
    		return dao.findAllList(STATEMENT_SELECT_BY_REFUND_ID, refundId);
    }

    /**
     * TODO [简要描述复写方法的内容].
     * @see cn.rkylin.oms.sysrefund.dao.ISysRefundSkuDAO#updateByPrimaryKeySelective(cn.rkylin.oms.sysrefund.domain.SysRefundSku)
     */
    @Override
    public int updateByPrimaryKeySelective(SysRefundSku record) {

        // TODO Auto-generated method stub
        return 0;
    }

    /**
     * TODO [简要描述复写方法的内容].
     * @see cn.rkylin.oms.sysrefund.dao.ISysRefundSkuDAO#updateByPrimaryKey(cn.rkylin.oms.sysrefund.domain.SysRefundSku)
     */
    @Override
    public int updateByPrimaryKey(SysRefundSku record) {

        // TODO Auto-generated method stub
        return 0;
    }

    /**
     * TODO [简要描述复写方法的内容].
     * @see cn.rkylin.oms.sysrefund.dao.ISysRefundSkuDAO#insertBatch(java.util.List)
     */
    @Override
    public int insertBatch(List<SysRefundSku> recordList) throws Exception {
        return dao.insertBatch(STATEMENT_INSERT_BATCH_SYSREFUNDSKUS, recordList);
    }

}

